/*
 * @Descripttion:
 * @version: 1.0
 * @Author: 狸猫
 * @Date: 2023-10-23 09:28:12
 * @LastEditors: 赛罗
 * @LastEditTime: 2023-11-27 17:44:13
 */
import request from '@/utils/request'


// 查询统计房屋数量
export function countHouseState(query) {
  return request({
    url: '/enterprise/house/house/countHouseState',
    method: 'get',
    params: query
  })
}
// 查询房间列表
export function listRoom(query) {
  return request({
    url: '/enterprise/house/house/list',
    method: 'get',
    params: query,
  })
}

// 根据区域查询房屋信息列表
export function areaHouseList(query) {
  return request({
    url: '/enterprise/house/house/areaList',
    method: 'get',
    params: query,
  })
}

// 查询房间列表(包含业主信息)
export function pageRoom(query) {
  return request({
    url: '/enterprise/house/house/page',
    method: 'get',
    params: query,
  })
}

// 根据订单入离时间查询房屋信息列表
export function housePageByOrder(query) {
  return request({
    url: '/enterprise/house/house/pageByOrder',
    method: 'get',
    params: query,
  })
}

// 查询统计房间数据
export function getStatistics() {
  return request({
    url: '/enterprise/house/house/statistics',
    method: 'get'
  })
}

// 查询房间详情
export function getRoom(houseId) {
  return request({
    url: '/enterprise/house/house/' + houseId,
    method: 'get'
  })
}

// 新增房间
export function addRoom(data) {
  return request({
    url: '/enterprise/house/house',
    method: 'post',
    data: data
  })
}

// 编辑房间
export function updateRoom(data) {
  return request({
    url: '/enterprise/house/house',
    method: 'put',
    data: data
  })
}

// 删除房间
export function delRoom(id) {
  return request({
    url: '/enterprise/house/house/' + id,
    method: 'delete'
  })
}

// 查询基本信息记录
export function operatingRecord(query) {
  return request({
    url: '/enterprise/house/operatingRecord/list',
    method: 'get',
    params: query
  })
}

//获取房管家信息
export function houseManagerList(params) {
  return request({
    url: "/enterprise/user/userBusiness/userList",
    method: "get",
    params
  });
}

//查询业主信息列表
export function listProprietor(params) {
  return request({
    url: "/enterprise/contract/proprietor/list",
    method: "get",
    params
  });
}

// 批量新增房屋信息
export function batchAdd(data) {
  return request({
    url: '/enterprise/house/house/batchAdd',
    method: 'post',
    data: data
  })
}



